import { ATeamCombat } from "GameLoop/WorldState/EntityManager/Entitys";
import { ABaseEntity } from "GameLoop/WorldState/EntityManager/Entitys/BaseEntity";
import { ETeamState } from "GameLoop/WorldState/EntityManager/Entitys/team";
import { BinaryDecision } from "framework/FSM/DecisionTree/Decision";
import { DecisionTreeNode } from "framework/FSM/DecisionTree/DecisionTreeNode";
 
export class DecisionTeamActive <T extends IStateArg<ATeamCombat >> extends BinaryDecision<T>
{


    public testValue(arg:T): boolean
    {
        const state = arg.entity.getNodeMemory().teamState 
        if( arg.entity.getAttacker().length==0)
        {
            return false;
        }
        return  state== ETeamState.Full ||  state == ETeamState.Absence 
    }

    value: any;


    public setValue(val: any)
    {
        this.value = val;
    }
}

